package com.sdvdxl.service.impl;

import java.sql.SQLException;

import org.springframework.stereotype.Service;

import com.sdvdxl.mapper.UserMapper;
import com.sdvdxl.model.UserEntity;
import com.sdvdxl.service.UserService;
import com.sdvdxl.util.JsonResult;

@Service
public class UserServiceImpl implements UserService {
	private UserMapper userMapper;


	public UserMapper getUserMapper() {
		return userMapper;
	}

	public void setUserMapper(UserMapper userMapper) {
		this.userMapper = userMapper;
	}

	@Override
	public JsonResult add(UserEntity guest) {
		JsonResult result = new JsonResult();
		try {
			userMapper.add(guest);
		} catch (SQLException e) {
			// TODO 计入日志
		}
		return result;
	}

}
